package com.tanhua.model.vo;

import com.tanhua.model.db.Option;
import com.tanhua.model.db.Problem;
import com.tanhua.model.db.UserInfo;
import com.tanhua.model.mongo.Movement;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import org.springframework.util.StringUtils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * @author lamy
 * @version 1.0
 * @ClassName: QuestionVo
 * @date 2021-12-26 20:11:59
 */
@Data
public class ProblemVo {
    private String id;
    private String question;
    private List<OptionsVo> options;

    public static ProblemVo init(Problem problem, List<OptionsVo> options) {
        ProblemVo problemVo = new ProblemVo();
        problemVo.setId(problem.getId().toString());
        problemVo.setQuestion(problem.getQuestion());
        problemVo.setOptions(options);

        return problemVo;
    }
}
